;; set language that can be evaluated in 'src' block
(org-babel-do-load-languages
 'org-babel-load-languages
 '(
   (emacs-lisp . t)
   (C . t)
   (clojure . t)
   ))

(setq org-confirm-babel-evaluate nil)

;; set org mode src hightlight
(setq org-src-fontify-natively t)
;; set up cider as backend for org-babel
;; (require 'org)
;; (require 'ob-clojure)
;; (require 'cider)
;; (setq org-babel-clojure-backend 'cider)

;; add html export settings to head of buffer
(defun org-add-html-head () 
  (interactive)
  (let ((current-point (point)) (e-home (file-truename user-emacs-directory)))
    (goto-char (point-min))
    (insert "#+OPTIONS: html-style:nil ^:{}\n")
    (insert (concat "#+HTML_HEAD: <link rel=\"stylesheet\" type=\"text/css\" href=\"" 
                    e-home
                    "blog.css\"/>\n"))
    (insert "#+HTML_HEAD: <link rel=\"stylesheet\" type=\"text/css\" href=\"blog.css\"/>\n")
    (insert (concat "#+TITLE: " (buffer-name) "\n"))
    (insert "#+SUBTITLE: SubTitle\n")))

;; copy css file to current path
(defun org-copy-css ()
  (interactive)
  (let ((css (concat user-emacs-directory "blog.css"))
        (current-dir-css (concat default-directory "blog.css")))
    (copy-file css current-dir-css)))
